6 animationSize
= frames
.size() - 1;
15 Animation::Animation(std::vector
<SDL_Texture
*> set
)
18 animationSize
= frames
.size();
28 Animation::~Animation()
33 SDL_Texture
* Animation::itterateAnimation(int framerate
) {
35 //std::cout << counter << " ";
36 SDL_Texture
* frame
= frames
.at(currentPosition
);
37 if (counter
> gameFPS
/ framerate
) {
38 previousPosition
= currentPosition
;
40 if (currentPosition
> animationSize
- 1) {
49 void Animation::destroyAnimation() {
50 int frameSize
= frames
.size();
51 for (int i
= 0; i
< frameSize
; i
++) {
52 SDL_DestroyTexture(frames
.at(i
));
56 void Animation::resetAnimation() {
60 bool Animation::checkDone(){